﻿<%inherits "Discuz.Space.Pages.usercpspacecomment"%>
<%template _header%>
<div class="wrap cl pageinfo">
	<div id="nav">
		<%if {usergroupinfo.allowsearch}>0%>
			<%template _quicksearch%>
		<%/if%>
        <a href="{config.forumurl}" class="title">{config.forumtitle}</a> &raquo; <a href="usercp.aspx">用户中心</a> &raquo; <strong>管理评论</strong>
	</div>
</div>
<script type="text/javascript">
	function checkCheckBox(form,objtag)
	{
		for(var i = 0; i < form.elements.length; i++) 
		{
			var e = form.elements[i];
			if(e.name == "commentid") 
			{
				e.checked = objtag.checked;
			}
		}
		objtag.checked = !objtag.checked;
	}
</script>
<div class="wrap uc cl">
	<%template _menu%>
	<div class="uc_main">
	<div class="uc_content">
		<h1>管理评论</h1>
		<%template _spacemenu%>	
	<%if page_err==0%>
		<%if ispost%>
			<%template _usercpmsgbox%>
		<%else%>
			<form id="commentlist" name="commentlist" method="post" action="">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="datatable">
			<tbody>
			<%if commentcount>0%>
				<tr class="colplural">
					<th width="80%">评论标题</th>
					<th>发表日期</th>
				</tr>
				<%loop currentcomment commentlist%>	
				<tr>
					<td class="datatitle"><input type="checkbox" name="commentid" id="commentid{currentcomment[commentid]}" value="{currentcomment[commentid]}" />
				{currentcomment[author]} 对 <a href="{spaceurl}space/viewspacepost.aspx?postid={currentcomment[postid]}" target="_blank">{currentcomment[posttitle]}</a> 发表评论</td>
					<td>{currentcomment[postdatetime]}</td>
				</tr>
				<tr>
					<td colspan="2">{currentcomment[content]}</td>
				</tr>
				<%/loop%>
			<%else%>
				<div class="zerothreads">暂无评论</div>
			<%/if%>
			</tbody>
			</table>
			</form>
			<div class="cpbox cl">
				<div class="pages_btns">
				   <%if commentcount>0%>
					<div class="pages">
						{pagenumbers} <em>{pageid}/{pagecount}页</em> 
					</div>
					<a href="javascript:;"  onclick="checkCheckBox($('commentlist'),this)" checked="true">全选</a>
					<span class="pipe">|</span>
					<a href="###" onclick="$('commentlist').submit()">删除</a> 
					<span class="pipe">|</span>
					<%/if%>
					<a href="usercpspacepostblog.aspx"><strong>发表日志</strong></a>
				</div>
			</div>
		<%/if%>
	<%else%>
		<%template _usercperrmsgbox%>
	<%/if%>
	</div>
	</div>
</div>
<%template _copyright%>
<%template _footer%>